package lesson6;

public class StringExample2 {

		public static void main(String[] args) {
			
			String s = "FordFiestaFiestaFordFiestaKazah li veche Fiesta";
			
			String focus = s.replaceAll("Fiesta", "Focus");
			
			System.out.println(focus);
			
			System.out.println(s.toUpperCase());
			System.out.println(s.toLowerCase());
			
			
			
			System.out.println(s.charAt(3));
			String sUpper = s.toUpperCase();
			String sLower = s.toLowerCase();
			int index = s.indexOf("Fiesta");
			int counter = 0;
			if(index != -1)
			{
				counter++;
			}

			while(index != -1)
			{
				index = s.indexOf("Fiesta", index+1);
				if(index == -1)
					break;
				counter++;
			}
			
			System.out.println(counter);
			
			String first = "H";
			char second = 'H';
			String.valueOf(second);//"H"
			
			first.equals(String.valueOf(second));
			
			
		}
}
